<?php
    session_start();
    $ses_user = $_SESSION["SES_USERNAME"];
    $co_user = $_COOKIE["login"];
    if ($ses_user == $co_user && $ses_user!="")
        header( 'Location: lihat_data.php' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="script/ajax.js"></script>
<script type="text/javascript">
	function Checkpass()
	{
	     var spassword = document.getElementById("textPassword").value;//document.form1.textPassword.value;
	     var susername = document.getElementById("textUsername").value;//document.form1.textUsername.value;
	     var arg = "username=" + susername + "&password=" + spassword;
	     prosesAjax("id_info","POST","kirimpos.php",arg);
	}
</script>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>FORMAT INSTRUMEN PROFIL KKG/MGMP, KKKS/MKKS, KKPS/MKPS</title>
	<link rel="shortcut icon" href="images/diknas-ico.png" />
	<link rel="stylesheet" type="text/css" href="css/login.css" />
</head>
<body>

	<form id="form1" name="form1" method="POST" action="kirimpos.php">
		<fieldset>
			<legend>Log in</legend>
			<label for="login">No NUPTK</label>
			<input name="textUsername" type="text" id="textUsername"/>
			<div class="clear"></div>
			<label for="password">Password</label>
			<input name="textPassword" type="password" id="textPassword"/>
			<div class="clear"></div>
			<div class="clear">
			<?
					if (isset($_GET["msg"])) {
						if (strcmp($_GET["msg"],"login_failed")==0)
							echo "Nuptk dan password tidak cocok";
						else if (strcmp($_GET["msg"],"logout")==0)
							echo "You have already logged out. Please sign in again.";
					}
					?></div>
			<div id="id_info"></div>
			<br />
			<br>
			<input type="submit" style="margin: -20px 0 0 307px;" class="button" value="Log in"/>
			<input type="button" style="margin: -20px 0 0 210px;" class="button" value="Daftar" onclick="parent.location='input-data.php'";/>
		</fieldset>
	</form>
        
	<div class="footer">
	 &copy 2011 - Kementerian Pendidikan dan Kebudayaan <br />
	</div>
</body>

</html>